DROP TABLE [dbo].[Entities];

CREATE TABLE [Entities]
(
	[Name] VARCHAR(30) NOT NULL,
	[PublicKey] BINARY(256) NOT NULL ,
	[Date] DATETIME2(7)NOT NULL ,
	[EntryStatus] SMALLINT NOT NULL CHECK( [EntryStatus] >= 0 AND [EntryStatus] < 3 )
)

INSERT INTO [Entities] ( Name, PublicKey, Date, EntryStatus ) VALUES ( 'Tomasz',12345, '2013-11-22 10:11:12.000', 0 );
INSERT INTO [Entities] ( Name, PublicKey, Date, EntryStatus ) VALUES ( 'Wojciech',67890, '2013-11-22 10:11:13.000', 1 );
INSERT INTO [Entities] ( Name, PublicKey, Date, EntryStatus ) VALUES ( 'Arek',13579, '2013-11-22 10:11:14.000', 2 );

SELECT TOP 1000 [Name]
      ,[PublicKey]
      ,[Date]
      ,[EntryStatus]
  FROM [Tenor].[dbo].[Entities]